{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Cluster Free Text Comments" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "y:\\Python Scripts\\pandas-survey-toolkit\\.venv\\Lib\\site-packages\\sentence_transformers\\cross_encoder\\CrossEncoder.py:11: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from tqdm.autonotebook import tqdm, trange\n", "y:\\Python Scripts\\pandas-survey-toolkit\\.venv\\Lib\\site-packages\\transformers\\utils\\generic.py:311: FutureWarning: `torch.utils._pytree._register_pytree_node` is deprecated. Please use `torch.utils._pytree.register_pytree_node` instead.\n", " torch.utils._pytree._register_pytree_node(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Original data:\n" ] }, { "data": { "application/vnd.microsoft.datawrangler.viewer.v0+json": { "columns": [ { "name": "index", "rawType": "int64", "type": "integer" }, { "name": "respondent_id", "rawType": "int64", "type": "integer" }, { "name": "comments", "rawType": "object", "type": "string" } ], "conversionMethod": "pd.DataFrame", "ref": "db75e487-8eb1-4d20-968b-56235b9ba61e", "rows": [ [ "0", "1", "Battery life is excellent, lasts all day" ], [ "1", "2", "The battery doesn't last long enough for me" ], [ "2", "3", "Battery performance is outstanding, very impressed" ], [ "3", "4", "Screen resolution is incredible, so sharp and clear" ], [ "4", "5", "Love the high-resolution display, colors are vibrant" ], [ "5", "6", "The screen is too reflective in bright light" ], [ "6", "7", "Camera quality is excellent for the price range" ], [ "7", "8", "Photos taken in low light are grainy and poor quality" ], [ "8", "9", "Camera autofocus is slow and often misses the shot" ], [ "9", "10", "The software is intuitive and easy to use" ], [ "10", "11", "User interface is confusing and not user-friendly" ], [ "11", "12", "Software keeps crashing when I open multiple apps" ], [ "12", "13", "Build quality feels premium and solid" ], [ "13", "14", "The device feels flimsy and cheaply made" ], [ "14", "15", "Very durable, survived several drops without damage" ], [ "15", "16", "Excellent value for money considering the features" ], [ "16", "17", "Overpriced for what you get compared to competitors" ], [ "17", "18", "Worth every penny, exceeded my expectations" ], [ "18", "19", "Customer service was unhelpful when I had issues" ], [ "19", "20", "Great customer support, quick and helpful responses" ] ], "shape": { "columns": 2, "rows": 20 } }, "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
respondent_idcomments
01Battery life is excellent, lasts all day
12The battery doesn't last long enough for me
23Battery performance is outstanding, very impre...
34Screen resolution is incredible, so sharp and ...
45Love the high-resolution display, colors are v...
56The screen is too reflective in bright light
67Camera quality is excellent for the price range
78Photos taken in low light are grainy and poor ...
89Camera autofocus is slow and often misses the ...
910The software is intuitive and easy to use
1011User interface is confusing and not user-friendly
1112Software keeps crashing when I open multiple apps
1213Build quality feels premium and solid
1314The device feels flimsy and cheaply made
1415Very durable, survived several drops without d...
1516Excellent value for money considering the feat...
1617Overpriced for what you get compared to compet...
1718Worth every penny, exceeded my expectations
1819Customer service was unhelpful when I had issues
1920Great customer support, quick and helpful resp...
\n", "
" ], "text/plain": [ " respondent_id comments\n", "0 1 Battery life is excellent, lasts all day\n", "1 2 The battery doesn't last long enough for me\n", "2 3 Battery performance is outstanding, very impre...\n", "3 4 Screen resolution is incredible, so sharp and ...\n", "4 5 Love the high-resolution display, colors are v...\n", "5 6 The screen is too reflective in bright light\n", "6 7 Camera quality is excellent for the price range\n", "7 8 Photos taken in low light are grainy and poor ...\n", "8 9 Camera autofocus is slow and often misses the ...\n", "9 10 The software is intuitive and easy to use\n", "10 11 User interface is confusing and not user-friendly\n", "11 12 Software keeps crashing when I open multiple apps\n", "12 13 Build quality feels premium and solid\n", "13 14 The device feels flimsy and cheaply made\n", "14 15 Very durable, survived several drops without d...\n", "15 16 Excellent value for money considering the feat...\n", "16 17 Overpriced for what you get compared to compet...\n", "17 18 Worth every penny, exceeded my expectations\n", "18 19 Customer service was unhelpful when I had issues\n", "19 20 Great customer support, quick and helpful resp..." ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# 02_cluster_comments.ipynb\n", "import pandas as pd\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "from pandas_survey_toolkit import nlp\n", "from pandas_survey_toolkit.vis import cluster_heatmap_plot\n", "\n", "# Create sample survey data with open-ended comments about a product\n", "data = {\n", " 'respondent_id': range(1, 21),\n", " 'comments': [\n", " \"Battery life is excellent, lasts all day\",\n", " \"The battery doesn't last long enough for me\",\n", " \"Battery performance is outstanding, very impressed\",\n", " \"Screen resolution is incredible, so sharp and clear\",\n", " \"Love the high-resolution display, colors are vibrant\",\n", " \"The screen is too reflective in bright light\",\n", " \"Camera quality is excellent for the price range\",\n", " \"Photos taken in low light are grainy and poor quality\",\n", " \"Camera autofocus is slow and often misses the shot\",\n", " \"The software is intuitive and easy to use\",\n", " \"User interface is confusing and not user-friendly\",\n", " \"Software keeps crashing when I open multiple apps\",\n", " \"Build quality feels premium and solid\",\n", " \"The device feels flimsy and cheaply made\",\n", " \"Very durable, survived several drops without damage\",\n", " \"Excellent value for money considering the features\",\n", " \"Overpriced for what you get compared to competitors\",\n", " \"Worth every penny, exceeded my expectations\",\n", " \"Customer service was unhelpful when I had issues\",\n", " \"Great customer support, quick and helpful responses\"\n", " ]\n", "}\n", "\n", "# Create DataFrame\n", "df = pd.DataFrame(data)\n", "\n", "# Display the original data\n", "print(\"Original data:\")\n", "display(df)\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "y:\\Python Scripts\\pandas-survey-toolkit\\.venv\\Lib\\site-packages\\transformers\\utils\\generic.py:311: FutureWarning: `torch.utils._pytree._register_pytree_node` is deprecated. Please use `torch.utils._pytree.register_pytree_node` instead.\n", " torch.utils._pytree._register_pytree_node(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Comment clusters:\n" ] }, { "data": { "application/vnd.microsoft.datawrangler.viewer.v0+json": { "columns": [ { "name": "index", "rawType": "int64", "type": "integer" }, { "name": "comments", "rawType": "object", "type": "string" }, { "name": "cluster", "rawType": "float64", "type": "float" }, { "name": "cluster_probability", "rawType": "float64", "type": "float" } ], "conversionMethod": "pd.DataFrame", "ref": "50c6ed27-cc9f-4d43-bbf5-0fcff6c9646e", "rows": [ [ "19", "Great customer support, quick and helpful responses", "-1.0", "0.0" ], [ "18", "Customer service was unhelpful when I had issues", "0.0", "0.6672630994917148" ], [ "0", "Battery life is excellent, lasts all day", "0.0", "1.0" ], [ "2", "Battery performance is outstanding, very impressed", "0.0", "1.0" ], [ "1", "The battery doesn't last long enough for me", "0.0", "1.0" ], [ "11", "Software keeps crashing when I open multiple apps", "1.0", "1.0" ], [ "10", "User interface is confusing and not user-friendly", "1.0", "1.0" ], [ "9", "The software is intuitive and easy to use", "1.0", "1.0" ], [ "12", "Build quality feels premium and solid", "2.0", "1.0" ], [ "13", "The device feels flimsy and cheaply made", "2.0", "0.8305596779467884" ], [ "14", "Very durable, survived several drops without damage", "2.0", "0.9067705948739729" ], [ "15", "Excellent value for money considering the features", "2.0", "1.0" ], [ "16", "Overpriced for what you get compared to competitors", "2.0", "1.0" ], [ "17", "Worth every penny, exceeded my expectations", "2.0", "1.0" ], [ "8", "Camera autofocus is slow and often misses the shot", "3.0", "0.7000346540467824" ], [ "6", "Camera quality is excellent for the price range", "3.0", "0.7000346540467824" ], [ "5", "The screen is too reflective in bright light", "3.0", "1.0" ], [ "4", "Love the high-resolution display, colors are vibrant", "3.0", "1.0" ], [ "7", "Photos taken in low light are grainy and poor quality", "3.0", "0.8474252580741306" ], [ "3", "Screen resolution is incredible, so sharp and clear", "3.0", "1.0" ] ], "shape": { "columns": 3, "rows": 20 } }, "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
commentsclustercluster_probability
19Great customer support, quick and helpful resp...-1.00.000000
18Customer service was unhelpful when I had issues0.00.667263
0Battery life is excellent, lasts all day0.01.000000
2Battery performance is outstanding, very impre...0.01.000000
1The battery doesn't last long enough for me0.01.000000
11Software keeps crashing when I open multiple apps1.01.000000
10User interface is confusing and not user-friendly1.01.000000
9The software is intuitive and easy to use1.01.000000
12Build quality feels premium and solid2.01.000000
13The device feels flimsy and cheaply made2.00.830560
14Very durable, survived several drops without d...2.00.906771
15Excellent value for money considering the feat...2.01.000000
16Overpriced for what you get compared to compet...2.01.000000
17Worth every penny, exceeded my expectations2.01.000000
8Camera autofocus is slow and often misses the ...3.00.700035
6Camera quality is excellent for the price range3.00.700035
5The screen is too reflective in bright light3.01.000000
4Love the high-resolution display, colors are v...3.01.000000
7Photos taken in low light are grainy and poor ...3.00.847425
3Screen resolution is incredible, so sharp and ...3.01.000000
\n", "
" ], "text/plain": [ " comments cluster \\\n", "19 Great customer support, quick and helpful resp... -1.0 \n", "18 Customer service was unhelpful when I had issues 0.0 \n", "0 Battery life is excellent, lasts all day 0.0 \n", "2 Battery performance is outstanding, very impre... 0.0 \n", "1 The battery doesn't last long enough for me 0.0 \n", "11 Software keeps crashing when I open multiple apps 1.0 \n", "10 User interface is confusing and not user-friendly 1.0 \n", "9 The software is intuitive and easy to use 1.0 \n", "12 Build quality feels premium and solid 2.0 \n", "13 The device feels flimsy and cheaply made 2.0 \n", "14 Very durable, survived several drops without d... 2.0 \n", "15 Excellent value for money considering the feat... 2.0 \n", "16 Overpriced for what you get compared to compet... 2.0 \n", "17 Worth every penny, exceeded my expectations 2.0 \n", "8 Camera autofocus is slow and often misses the ... 3.0 \n", "6 Camera quality is excellent for the price range 3.0 \n", "5 The screen is too reflective in bright light 3.0 \n", "4 Love the high-resolution display, colors are v... 3.0 \n", "7 Photos taken in low light are grainy and poor ... 3.0 \n", "3 Screen resolution is incredible, so sharp and ... 3.0 \n", "\n", " cluster_probability \n", "19 0.000000 \n", "18 0.667263 \n", "0 1.000000 \n", "2 1.000000 \n", "1 1.000000 \n", "11 1.000000 \n", "10 1.000000 \n", "9 1.000000 \n", "12 1.000000 \n", "13 0.830560 \n", "14 0.906771 \n", "15 1.000000 \n", "16 1.000000 \n", "17 1.000000 \n", "8 0.700035 \n", "6 0.700035 \n", "5 1.000000 \n", "4 1.000000 \n", "7 0.847425 \n", "3 1.000000 " ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Comments per cluster:\n" ] }, { "data": { "application/vnd.microsoft.datawrangler.viewer.v0+json": { "columns": [ { "name": "index", "rawType": "int64", "type": "integer" }, { "name": "cluster", "rawType": "float64", "type": "float" }, { "name": "count", "rawType": "int64", "type": "integer" } ], "conversionMethod": "pd.DataFrame", "ref": "c15e1d3b-40e7-4cc1-8d2b-05e4b7bbd599", "rows": [ [ "0", "3.0", "6" ], [ "1", "2.0", "6" ], [ "2", "0.0", "4" ], [ "3", "1.0", "3" ], [ "4", "-1.0", "1" ] ], "shape": { "columns": 2, "rows": 5 } }, "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
clustercount
03.06
12.06
20.04
31.03
4-1.01
\n", "
" ], "text/plain": [ " cluster count\n", "0 3.0 6\n", "1 2.0 6\n", "2 0.0 4\n", "3 1.0 3\n", "4 -1.0 1" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "\n", "# Cluster the comments\n", "df_clustered = df.cluster_comments(input_column='comments', min_cluster_size=3, n_neighbors=5, cluster_selection_epsilon=0.5)\n", "\n", "# Examine the clusters\n", "print(\"\\nComment clusters:\")\n", "display(df_clustered[['comments', 'cluster', 'cluster_probability']].sort_values('cluster'))\n", "\n", "# Count comments per cluster\n", "cluster_counts = df_clustered['cluster'].value_counts().reset_index()\n", "cluster_counts.columns = ['cluster', 'count']\n", "print(\"\\nComments per cluster:\")\n", "display(cluster_counts)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/vnd.microsoft.datawrangler.viewer.v0+json": { "columns": [ { "name": "index", "rawType": "int64", "type": "integer" }, { "name": "respondent_id", "rawType": "int64", "type": "integer" }, { "name": "comments", "rawType": "object", "type": "string" }, { "name": "sentence_embedding", "rawType": "object", "type": "unknown" }, { "name": "umap_x", "rawType": "float64", "type": "float" }, { "name": "umap_y", "rawType": "float64", "type": "float" }, { "name": "cluster", "rawType": "float64", "type": "float" }, { "name": "cluster_probability", "rawType": "float64", "type": "float" } ], "conversionMethod": "pd.DataFrame", "ref": "6439217f-75c2-4b1e-be74-78ab1e7f1f68", "rows": [ [ "0", "1", "Battery life is excellent, lasts all day", "[-3.86310257e-02 4.46252339e-02 -2.86673959e-02 -7.28003040e-04\n -1.51673853e-02 -1.36903645e-02 2.95201428e-02 4.76424247e-02\n 3.11250258e-02 5.63166440e-02 -1.96202789e-02 4.13837880e-02\n -4.18104939e-02 7.77225569e-02 8.09132215e-03 2.90621985e-02\n 8.20438862e-02 -1.26324862e-01 -6.89860508e-02 -1.47164566e-02\n -1.35838529e-02 -6.72683120e-02 1.19956158e-01 2.46624090e-02\n -2.01472156e-02 3.76538597e-02 -8.19500443e-03 1.38342055e-02\n -5.91539545e-03 3.58577794e-03 -4.13320810e-02 9.93314758e-02\n 4.27438132e-02 3.44999805e-02 -2.35050041e-02 2.96348352e-02\n -3.05678304e-02 -6.88336848e-04 1.87004562e-02 -1.59246270e-02\n -8.03615302e-02 6.20216131e-02 3.03022955e-02 -8.13769773e-02\n -1.85650550e-02 3.67100723e-02 3.73940542e-02 -7.36217871e-02\n 9.09691304e-02 1.05789058e-01 4.26943302e-02 -4.41866741e-03\n 7.15865493e-02 -4.95032854e-02 -3.33301872e-02 -3.25426459e-02\n -7.07093701e-02 -2.28584595e-02 7.20213726e-02 -5.21547869e-02\n 3.91929084e-03 5.03728278e-02 -1.08315209e-02 -2.98664290e-02\n -1.22654987e-02 -2.79979799e-02 -1.34535599e-02 -1.58734228e-02\n 8.76315113e-04 5.14066629e-02 -6.43244237e-02 7.73094296e-02\n -9.01438743e-02 -1.09616900e-02 -5.71222752e-02 6.49795979e-02\n 4.33027223e-02 -3.26006971e-02 7.07205907e-02 -3.96080911e-02\n 7.38829523e-02 -3.80096100e-02 2.48271991e-02 -2.54316255e-03\n 6.56124055e-02 -4.65845466e-02 5.33528160e-03 2.01155022e-02\n -3.93275879e-02 -3.29117216e-02 -3.98101248e-02 8.84251222e-02\n 4.00626753e-03 -1.87586974e-02 2.42650658e-02 3.74755193e-03\n -3.16985585e-02 2.99782306e-03 -7.02198371e-02 4.74491306e-02\n -1.19555797e-02 1.42231863e-02 6.90469798e-03 -6.15128651e-02\n 2.16512028e-02 2.09292900e-02 -1.80172548e-02 1.02305204e-01\n 2.05108663e-03 3.28404754e-02 4.80449796e-02 1.68122984e-02\n 2.69185752e-03 1.45396581e-02 1.28460536e-02 9.31931809e-02\n -7.89337307e-02 5.20677008e-02 7.50745237e-02 3.07704788e-02\n 5.69726154e-02 -3.28834727e-03 8.27791542e-03 -6.18388578e-02\n -6.45639226e-02 -3.97464149e-02 1.04747936e-01 1.55099621e-35\n -2.28461809e-02 1.02879582e-02 -1.02733320e-03 -1.05353305e-02\n -4.96573485e-02 2.20570490e-02 -3.93161364e-02 1.60257355e-03\n -4.16883752e-02 -6.13784865e-02 -3.49081159e-02 1.30979903e-02\n -1.64598059e-02 2.56300643e-02 7.86074027e-02 2.17243610e-03\n 3.60639580e-02 8.19872599e-03 -1.90379638e-02 2.40193754e-02\n 5.32898717e-02 -1.05339684e-01 2.94600334e-02 4.26490828e-02\n 5.05268127e-02 4.10550497e-02 6.31670952e-02 -1.79157518e-02\n -5.41084632e-03 -2.87947501e-03 2.09584590e-02 2.62905806e-02\n -6.18964285e-02 -5.82616664e-02 2.23198086e-02 3.51529103e-03\n 5.06951893e-03 9.22422670e-03 -2.96422616e-02 4.35314439e-02\n -8.47320780e-02 6.04300126e-02 -8.10906012e-03 -9.02736187e-03\n 2.34935377e-02 -1.39040472e-02 1.11632003e-02 4.89465818e-02\n -4.44340380e-03 6.72113746e-02 -6.64073899e-02 -8.32988545e-02\n -3.10809128e-02 2.45495420e-02 -6.44599646e-02 5.87064661e-02\n -1.70290954e-02 3.82437631e-02 2.44569089e-02 5.62372617e-02\n 1.02873389e-02 -3.13186496e-02 3.20136622e-02 -1.11630447e-02\n 2.62960661e-02 5.56223392e-02 -3.52947228e-02 -9.63868760e-03\n -6.73166513e-02 2.64331605e-02 1.08728290e-01 -8.70541632e-02\n 1.09746374e-01 -7.48907626e-02 -7.35875815e-02 1.38300506e-03\n -9.05563775e-03 -5.36325164e-02 -1.06466770e-01 8.66677985e-02\n -1.27915628e-02 6.19590543e-02 1.85745470e-02 -9.71800163e-02\n 9.68751311e-02 -5.56466244e-02 -1.06474541e-01 -6.66982532e-02\n -7.57652596e-02 1.43400654e-01 -3.98845086e-03 -1.15312985e-04\n 7.34531656e-02 -3.28453332e-02 3.40299606e-02 -1.94216508e-34\n -2.58093537e-03 9.28521529e-02 2.81206276e-02 4.74207290e-02\n -4.23741862e-02 1.54269987e-03 -1.47916973e-01 9.40100253e-02\n -9.55664217e-02 4.66991998e-02 -6.15537949e-02 5.82569242e-02\n -5.73498271e-02 1.03909522e-02 5.74845895e-02 5.13358880e-03\n 3.69447321e-02 -1.11287549e-01 3.85278426e-02 -2.59496290e-02\n -3.39348912e-02 6.02145866e-02 -4.62704226e-02 -1.46297971e-02\n 2.18757652e-02 2.13724468e-02 -8.62111226e-02 6.98742047e-02\n 4.30620015e-02 1.67441240e-03 -2.89774593e-02 2.06222106e-02\n -5.60435504e-02 -1.97811220e-02 6.31349115e-03 3.02008018e-02\n 5.52043281e-02 4.97673117e-02 -3.68523924e-03 1.09459329e-02\n 7.57929171e-03 1.25351414e-01 3.51901911e-02 -8.82909223e-02\n -1.16894012e-02 4.74774092e-02 -7.10194409e-02 -2.41118041e-03\n -3.86740379e-02 6.78896531e-02 3.07140760e-02 -1.59509592e-02\n -1.21644395e-03 -6.75865933e-02 -3.64125557e-02 -9.89805385e-02\n 1.84687376e-02 -2.47321576e-02 -1.25721963e-02 -1.02369919e-01\n 4.97138686e-03 -1.00400308e-02 -2.24521160e-02 8.85042548e-02\n -3.09155812e-03 1.17094861e-02 -4.66590468e-03 5.45924008e-02\n 1.93003006e-02 -9.27131921e-02 -2.28295475e-02 6.56097475e-03\n -7.30975997e-03 4.37831469e-02 -2.21484583e-02 4.79424465e-03\n -1.20352805e-02 -1.36477891e-02 -2.95876116e-02 -8.99479445e-03\n -1.78321414e-02 -3.30215767e-02 2.14541405e-02 -1.12162530e-01\n -5.29339202e-02 -5.27983159e-02 -1.12983705e-02 -2.11981535e-02\n -2.22764816e-02 1.16770029e-01 3.75001878e-02 -7.51639232e-02\n -1.36574730e-01 6.55909255e-02 -2.78385729e-02 -2.08539834e-08\n 5.89506188e-03 3.94391455e-02 4.77768481e-02 -1.80400256e-02\n -2.56349239e-02 -9.06089991e-02 9.46285352e-02 4.01821621e-02\n 4.39495780e-02 3.27981114e-02 1.24621637e-01 -2.93458644e-02\n -5.96297309e-02 -3.07538453e-02 2.35660914e-02 5.23144205e-04\n 8.66283923e-02 7.83775672e-02 -4.12742160e-02 8.99714753e-02\n -1.15913078e-02 -2.90954150e-02 -3.79901044e-02 4.27021682e-02\n -2.42440659e-03 -3.69957532e-03 1.46914562e-02 -1.19743258e-01\n 2.65479018e-03 4.90648998e-03 -6.62653744e-02 6.43074214e-02\n -3.34521639e-03 8.63179285e-03 -3.21976878e-02 -6.11692928e-02\n -9.46054049e-03 -9.71702039e-02 5.53266332e-02 6.63354024e-02\n 2.18072198e-02 -4.05602790e-02 -8.10351595e-02 -1.31396251e-02\n -1.21163428e-02 -5.66850863e-02 5.15421815e-02 -7.48586208e-02\n -2.24339459e-02 3.44616659e-02 4.04628739e-02 5.26021086e-02\n -1.78481862e-02 -5.21968491e-03 -1.08485036e-02 3.25255543e-02\n 4.81390543e-02 5.81847690e-03 2.05716174e-02 6.17750641e-03\n 5.44118509e-02 -2.06146128e-02 -2.69854385e-02 6.69432282e-02]", "11.356366157531738", "4.052677631378174", "0.0", "1.0" ], [ "1", "2", "The battery doesn't last long enough for me", "[-7.71922816e-04 -4.24461439e-03 1.10753840e-02 -2.72176415e-02\n 7.31582567e-02 -2.83317622e-02 -1.24130892e-02 1.54774375e-02\n 5.69942668e-02 5.80213480e-02 -1.60609856e-02 -6.38987496e-03\n -6.07607886e-02 7.09320828e-02 -2.10618768e-02 2.74048951e-02\n 1.25625897e-02 -8.97722542e-02 -4.23981547e-02 7.75212003e-03\n -5.30233867e-02 -2.11334545e-02 4.36669476e-02 1.91843566e-02\n -1.35814901e-02 9.21684690e-03 -5.49213775e-02 -1.92501992e-02\n -2.61101965e-02 -3.19578089e-02 5.10882307e-03 7.62602910e-02\n 4.91108559e-02 5.12817234e-04 4.32459451e-02 2.59705316e-02\n -8.52284431e-02 -1.65292509e-02 5.29182516e-02 -2.76576001e-02\n -7.75735974e-02 8.88988376e-02 9.31390524e-02 1.84975881e-02\n 5.32911569e-02 -2.04723198e-02 5.65759167e-02 -5.36873378e-02\n 1.54531613e-01 5.72004877e-02 2.58966144e-02 -3.28802280e-02\n 9.78756789e-03 -8.51102918e-03 -3.84867787e-02 -9.31198336e-03\n 7.37718493e-03 6.58950433e-02 4.68237661e-02 -1.52782286e-02\n -1.89314149e-02 1.79299787e-02 -5.83140813e-02 -2.72432566e-02\n -2.19724197e-02 -4.04967479e-02 1.31418870e-04 -2.65248176e-02\n -1.99029539e-02 4.35376316e-02 -5.05147353e-02 6.47429749e-02\n -1.08280808e-01 2.71577667e-02 -9.31176022e-02 9.68975760e-03\n 4.95703928e-02 1.76678598e-02 1.10778585e-01 4.80984291e-03\n -2.04626955e-02 -8.61008167e-02 2.19117105e-02 4.45468575e-02\n 1.67610720e-01 -1.97960529e-03 1.25762269e-01 3.96432988e-02\n -1.11145981e-01 -6.13166764e-02 -8.32352564e-02 4.04038168e-02\n -3.28485221e-02 -6.95875436e-02 -2.40388084e-02 6.41590450e-04\n 1.93616133e-02 7.05221444e-02 -8.24829191e-02 1.12999894e-01\n -1.48655463e-03 3.37150767e-02 1.59591734e-02 -3.88017148e-02\n 7.60978786e-03 -1.74716320e-02 -3.28003094e-02 9.91438553e-02\n -7.07774982e-03 2.33796816e-02 4.71233577e-02 6.53837202e-03\n -1.09426938e-02 4.79190983e-02 -7.90060905e-04 2.38991957e-02\n -7.15131462e-02 4.61715646e-02 1.06596865e-01 4.48963977e-02\n 3.07214390e-02 -2.81199906e-02 -8.08828622e-02 -2.72833672e-03\n -9.68808904e-02 -3.22310068e-02 8.06186721e-02 -1.97473298e-33\n -4.08398397e-02 -3.17309164e-02 -1.64877474e-02 6.74490863e-03\n -1.87570937e-02 1.45961242e-02 1.16356751e-02 -2.82042101e-02\n -4.22977284e-02 3.15043144e-02 -3.69191468e-02 1.42013486e-02\n -5.53826839e-02 -2.67935474e-03 5.29850982e-02 3.19431449e-04\n 4.18780036e-02 -1.09548960e-02 -3.98796387e-02 -3.36911976e-02\n 5.62807471e-02 -1.60413370e-01 5.96642215e-03 4.54714149e-02\n 7.64046311e-02 8.41291845e-02 9.42173675e-02 4.24962927e-04\n 9.75635543e-04 1.08153410e-02 4.85625714e-02 5.61152361e-02\n -5.23180403e-02 -4.66247126e-02 3.99564914e-02 -4.09364365e-02\n 6.28617629e-02 7.96934739e-02 3.62618417e-02 -6.20881543e-02\n -3.79707925e-02 6.18476048e-02 -2.55887564e-02 -1.31850503e-02\n 5.24639385e-03 -7.41811916e-02 5.13499789e-02 5.31274602e-02\n -1.01944879e-01 9.86728296e-02 -3.33269872e-02 -6.86479658e-02\n 9.88266803e-03 -2.53905039e-02 -4.71603870e-02 9.17463098e-03\n 5.22658229e-02 -2.02233419e-02 -1.83341261e-02 2.97312508e-03\n 5.16804792e-02 -1.48682734e-02 -4.24303254e-03 2.92435009e-02\n 8.41775239e-02 1.52837643e-02 -1.97720435e-02 6.49642712e-03\n -6.36074394e-02 2.62015909e-02 4.95824628e-02 -9.71382782e-02\n 5.67182414e-02 -6.87663332e-02 -9.33965668e-02 -4.30611968e-02\n -2.91421004e-02 -4.19562720e-02 -1.39084220e-01 -2.17248220e-02\n 3.68417054e-02 -4.49298397e-02 -7.45482184e-03 -4.15442837e-03\n 9.47310701e-02 -5.56952618e-02 -4.86175530e-02 -7.08349347e-02\n -5.61484918e-02 7.12200254e-02 -5.39811179e-02 -7.19111189e-02\n 5.42917475e-02 -6.13963380e-02 7.11817341e-03 1.60199933e-33\n -3.86022702e-02 -6.13595126e-03 3.42202932e-02 -1.00924857e-02\n 3.86478417e-02 3.29777077e-02 -7.48105068e-03 8.39104876e-02\n -1.11735478e-01 2.92973351e-02 -2.36360896e-02 -1.13346493e-02\n -1.33200716e-02 5.56218717e-03 1.58064812e-01 -1.77987609e-02\n 8.83789137e-02 -1.71991475e-02 5.98252267e-02 -1.82912163e-02\n -2.55059246e-02 8.20877850e-02 -4.11403626e-02 2.89801334e-04\n -2.58609583e-03 4.50439192e-03 -4.67005037e-02 1.77559257e-02\n 9.43930726e-03 2.22412497e-02 4.64772657e-02 -5.92421144e-02\n -9.95773971e-02 -1.79305039e-02 1.06313091e-03 -7.52671994e-03\n -2.57989159e-03 7.60668814e-02 1.66404806e-02 2.44013015e-02\n -6.58523524e-03 3.99379320e-02 4.24208418e-02 -4.49771620e-02\n 2.03183759e-02 -2.35064030e-02 -7.30306236e-03 1.47128175e-03\n 2.74458677e-02 9.25994366e-02 3.57867889e-02 -3.78348865e-02\n 3.28780264e-02 -3.72872292e-03 -6.40124315e-03 -6.45838082e-02\n 3.30880135e-02 -1.67735070e-02 -4.03570384e-02 -9.51692238e-02\n 2.65255347e-02 4.37826663e-03 9.56202333e-04 1.39060607e-02\n 2.03447510e-02 2.27602245e-03 5.83122857e-02 8.52505937e-02\n 6.13308996e-02 1.14668009e-03 -6.72238530e-04 2.24072170e-02\n 1.10804746e-02 1.33372545e-02 -3.64297852e-02 -7.28811021e-04\n -5.29155582e-02 4.52809483e-02 -1.67296324e-02 -5.90275824e-02\n 3.21459137e-02 1.57864112e-02 2.52157468e-02 -9.41137746e-02\n -2.17513219e-02 -3.82057615e-02 1.67135540e-02 7.37509429e-02\n -3.12078930e-02 5.30813187e-02 4.71810736e-02 -4.84144082e-04\n -4.53632735e-02 8.67066383e-02 -1.55714469e-03 -2.39281004e-08\n -1.82012152e-02 7.28418678e-02 1.82574475e-03 -6.20281957e-02\n -1.28376540e-02 -5.01081049e-02 5.05023003e-02 -3.40265818e-02\n 2.70650201e-02 -5.02534173e-02 1.26204073e-01 -6.98223785e-02\n 1.68812014e-02 -3.25991027e-02 -2.80803405e-02 4.65565547e-02\n 7.08812475e-03 3.34564075e-02 -2.85090581e-02 4.63797040e-02\n -6.88795745e-02 -1.85770374e-02 -1.36238299e-02 -3.28260288e-02\n 2.72083078e-02 3.42906616e-03 -1.03596337e-02 -4.50894050e-02\n 3.00094951e-02 -6.85732290e-02 -4.47516814e-02 1.14082314e-01\n -2.94179693e-02 -1.69567969e-02 -1.00755960e-01 -1.04678228e-01\n 4.70110327e-02 -7.58121237e-02 3.07520777e-02 -6.04218571e-03\n -9.28688236e-03 -2.07565329e-03 -7.33813643e-02 8.82758722e-02\n -2.06228290e-02 -5.78755252e-02 1.25656813e-01 -7.68440291e-02\n -4.34779972e-02 8.22584480e-02 -1.90938022e-02 1.34961773e-02\n -6.65201712e-03 3.81691242e-03 3.73311341e-02 2.68038381e-02\n 2.69665737e-02 4.38373461e-02 -2.74027261e-05 -1.24881659e-02\n 8.23518708e-02 -4.34244871e-02 -8.82380456e-03 -1.47160888e-03]", "11.582358360290527", "3.5869386196136475", "0.0", "1.0" ], [ "2", "3", "Battery performance is outstanding, very impressed", "[-8.02224688e-03 9.04987901e-02 -8.67905021e-02 -2.21284269e-03\n -4.04444188e-02 -5.37460949e-03 3.65396440e-02 9.32890270e-03\n -1.35288788e-02 5.18469289e-02 -4.77527045e-02 5.00407815e-02\n 2.87550464e-02 3.82988937e-02 2.43043769e-02 5.70340920e-03\n 1.44287869e-01 -7.31508210e-02 -3.19417589e-03 -2.94976439e-02\n 1.04676262e-02 -3.32760327e-02 1.78622991e-01 -1.51612377e-03\n 4.93961759e-02 4.86935861e-02 -4.92856018e-02 3.13882530e-02\n 1.13422349e-02 -6.23936690e-02 -3.88502926e-02 5.95838949e-02\n 1.48684867e-02 -2.75687650e-02 -7.34959589e-03 5.40374406e-02\n 1.47297652e-02 1.05971762e-03 8.15431178e-02 -5.08855954e-02\n -4.25598584e-02 3.10072936e-02 1.13527045e-01 -4.12749760e-02\n -1.10500609e-03 3.34453844e-02 4.93638068e-02 -4.71043065e-02\n 2.95325667e-02 -2.22446136e-02 2.78017893e-02 -1.19868414e-02\n 2.38648299e-02 -1.14022292e-01 -1.01566993e-01 2.11361758e-02\n -3.50657776e-02 -3.35970819e-02 2.47332640e-02 -1.12010501e-01\n 1.74894277e-02 4.83709164e-02 -1.86490174e-02 1.79839619e-02\n -1.48042487e-02 -6.14403673e-02 2.29973104e-02 -3.43335643e-02\n -5.03200479e-03 1.43570425e-02 -1.50266783e-02 8.96405280e-02\n -2.01288462e-02 -1.58910304e-02 -4.80367541e-02 2.82486770e-02\n 7.26062385e-03 -9.20002349e-03 4.57358584e-02 3.44352517e-03\n 1.95060968e-02 -8.47074315e-02 -3.32367308e-02 -3.19291055e-02\n 6.65098727e-02 -7.80925155e-02 5.12585044e-02 -2.90759485e-02\n -7.65812993e-02 -1.72835793e-02 8.92265793e-03 8.69221464e-02\n -4.85353991e-02 -4.49167415e-02 -6.05084524e-02 3.06284167e-02\n 4.08560317e-03 -2.72310264e-02 -4.11969088e-02 4.04196829e-02\n 8.68638530e-02 7.95767233e-02 8.33841227e-03 -5.99352680e-02\n 1.37246512e-02 9.63532075e-04 3.39838602e-02 1.18003525e-01\n 1.44940903e-02 2.84550581e-02 5.22784814e-02 3.03413607e-02\n -3.46919186e-02 6.91752508e-02 -1.50416070e-03 8.51115957e-02\n -9.71972048e-02 3.02025490e-02 1.27195835e-01 1.66818351e-02\n 4.37637679e-02 -1.89877935e-02 2.93601323e-02 -2.90300176e-02\n -8.10828805e-03 -2.63193939e-02 6.24991842e-02 -1.63586753e-33\n -4.63014394e-02 2.69777402e-02 1.10931955e-02 1.77456569e-02\n -3.28008235e-02 2.94956546e-02 -7.18644857e-02 -6.55502826e-02\n -5.98178990e-02 -9.25453752e-03 -1.12871610e-01 5.67049347e-02\n 5.08609600e-02 4.88620661e-02 2.89379451e-02 -4.85633463e-02\n 1.62617231e-04 -2.33822558e-02 -4.36742743e-03 5.64831011e-02\n 1.34724015e-02 -5.19114695e-02 -1.44387269e-02 5.23406863e-02\n 1.04320586e-01 9.37796477e-03 1.02686815e-01 -3.39461528e-02\n -2.17871889e-02 4.06270698e-02 1.38455359e-02 -1.21044349e-02\n -7.20540807e-02 -4.75861765e-02 -1.80863626e-02 2.41930690e-02\n -7.82085024e-03 -1.98608842e-02 4.07735594e-02 -1.39074912e-02\n -6.15182817e-02 4.58405688e-02 -8.65053162e-02 -7.16172531e-02\n -3.41094770e-02 8.90843384e-03 -5.40767796e-02 4.32830453e-02\n -1.00419214e-02 5.65892868e-02 -9.49991271e-02 -8.56068917e-03\n 1.20538734e-02 2.85969358e-02 4.44315299e-02 4.15893234e-02\n 2.53991503e-02 5.30137420e-02 2.08750796e-02 7.94057250e-02\n -2.35502161e-02 6.11834228e-02 -8.09346810e-02 -6.07953593e-02\n -6.27687275e-02 -2.97743268e-02 -3.27121206e-02 -8.94676056e-03\n -6.30001575e-02 1.96636338e-02 3.92606556e-02 -9.61321369e-02\n 7.75749311e-02 -6.60567507e-02 -3.34587949e-03 -3.92046664e-03\n -4.95653003e-02 -5.89924157e-02 -5.54881990e-02 2.30631302e-03\n -6.95924759e-02 4.45623435e-02 3.25573646e-02 -1.08750038e-01\n -5.50947385e-04 -4.85472754e-02 -5.85032143e-02 -7.82273933e-02\n -3.51741388e-02 5.13280705e-02 4.24517877e-02 -1.56948250e-02\n 4.22829166e-02 -3.02872807e-02 7.43260700e-03 6.66106777e-34\n 4.30836491e-02 3.85513902e-02 7.89109990e-02 2.77740266e-02\n 1.87885091e-02 6.97568431e-02 -8.15406218e-02 4.18804726e-03\n -1.06251247e-01 8.79205205e-03 -2.87413225e-02 4.98373322e-02\n -5.99729605e-02 2.44810209e-02 2.51223799e-02 -1.81250870e-02\n 4.97610644e-02 -5.03181815e-02 8.10194910e-02 -5.12799397e-02\n 1.83614735e-02 1.13417923e-01 1.79170761e-02 -1.79317053e-02\n -3.59826088e-02 6.76806737e-03 -6.97386861e-02 2.07973700e-02\n 2.88103670e-02 -1.09173484e-01 1.32553922e-02 3.28160189e-02\n -3.36659290e-02 4.99293059e-02 -8.81324150e-03 -2.62256563e-02\n 6.09966144e-02 2.82576233e-02 -2.49261665e-03 4.63034362e-02\n 3.72807048e-02 5.97833470e-02 -1.02296714e-02 -2.29317956e-02\n -8.07231478e-03 -4.38145269e-03 -4.90619503e-02 1.84007417e-02\n -2.06273291e-02 8.98484811e-02 6.59496663e-03 -2.97075044e-03\n -2.53392775e-02 -1.28009403e-02 -3.15484218e-02 -1.12726554e-01\n 3.79308760e-02 -4.72781956e-02 -4.55292724e-02 -3.86554413e-02\n -1.28598744e-02 2.18837447e-02 -2.82520708e-02 3.43173891e-02\n 2.90193874e-02 -5.00160009e-02 6.95339730e-03 -4.72391665e-04\n 6.50828257e-02 -2.43902020e-02 -9.34905559e-02 -1.35707976e-02\n -4.75099124e-03 5.07716648e-02 -1.46058602e-02 -7.83819780e-02\n 8.38168263e-02 -3.37727182e-02 -1.15580885e-02 -5.44590466e-02\n 2.73511410e-02 3.75376604e-02 3.47788595e-02 -1.20985657e-01\n -6.54125363e-02 3.57278511e-02 -1.18482420e-02 -4.03955616e-02\n -3.62549014e-02 3.57553400e-02 6.52283877e-02 2.03368813e-02\n -1.13425456e-01 3.35009769e-02 -1.32578863e-02 -1.87019964e-08\n -1.55843999e-02 5.41194081e-02 1.08569125e-02 1.38335982e-02\n -2.34945444e-03 -7.92770684e-02 1.92402527e-02 7.51697645e-02\n 1.13040498e-02 -5.56541197e-02 1.33525982e-01 -7.82618076e-02\n -1.32770836e-02 -5.00867516e-03 7.22382441e-02 3.11451554e-02\n 5.23967445e-02 1.57977685e-01 -2.83208527e-02 4.50979769e-02\n -1.63806789e-02 2.54783593e-02 -1.39915366e-02 -6.48669247e-03\n 7.53007689e-03 -1.00178737e-03 -9.42825377e-02 -9.45140868e-02\n 3.80341485e-02 7.38265086e-03 -7.88751096e-02 6.01531640e-02\n 2.86310073e-02 -5.29871397e-02 6.02616370e-03 -4.49792072e-02\n 4.12052274e-02 -6.61227405e-02 5.44934981e-02 -2.34660096e-02\n 4.66401353e-02 -1.07513033e-01 -4.62625921e-02 3.93846743e-02\n 1.79231148e-02 -8.09846595e-02 6.48246258e-02 -2.79588979e-02\n -4.24717143e-02 1.84070822e-02 -1.79225230e-03 7.28360331e-03\n -3.29974629e-02 -2.10175826e-03 -2.35077739e-02 9.66362730e-02\n -2.31354069e-02 -2.51643211e-02 -2.60547805e-03 4.23745215e-02\n 1.07976757e-01 -4.40818667e-02 -9.73222125e-03 8.42592418e-02]", "11.752823829650879", "4.191681861877441", "0.0", "1.0" ], [ "3", "4", "Screen resolution is incredible, so sharp and clear", "[-1.48082431e-02 -3.13582607e-02 3.55389640e-02 -5.50066493e-02\n -2.45993789e-02 -6.49956837e-02 5.11257537e-02 9.03628170e-02\n -4.78052422e-02 6.95037246e-02 -4.30769473e-03 6.00429662e-02\n 1.85057856e-02 -1.76697113e-02 -6.44183978e-02 -2.16709226e-02\n 8.93247575e-02 -1.33158296e-01 1.51499026e-02 -5.28371371e-02\n 4.63592894e-02 -5.02098203e-02 -8.89467634e-03 -4.81002145e-02\n 6.33399189e-02 2.60674581e-02 1.67971738e-02 2.59848554e-02\n 5.51278703e-03 -5.67611456e-02 -4.23806496e-02 1.04714558e-01\n 6.87385350e-02 7.47232698e-03 -4.29114476e-02 -4.31200862e-02\n 3.37561034e-02 -5.10827303e-02 3.79155725e-02 -5.90494275e-02\n -3.23323905e-02 2.05583218e-02 2.00847201e-02 5.29743321e-02\n 2.04772819e-02 -7.89305791e-02 5.60999662e-02 2.95030419e-02\n 7.26611167e-02 -7.77876824e-02 -1.39991678e-02 -1.49592347e-02\n -3.19874287e-02 -1.08047947e-01 -5.23044094e-02 2.80315187e-02\n -5.38353249e-02 6.26063580e-03 1.21994531e-02 5.20843789e-02\n 3.80226737e-03 4.00839653e-03 -1.38305724e-02 3.70046385e-02\n 6.51269108e-02 -5.66793839e-03 9.22667887e-03 -9.64205712e-02\n -8.10259581e-03 3.83623899e-03 -8.32741708e-02 4.96125594e-02\n 1.75495651e-02 -1.33456215e-02 -7.59818777e-02 -5.25502637e-02\n -6.02562204e-02 -8.87957662e-02 -2.37213206e-02 1.08769231e-01\n 4.51030582e-03 -4.04861532e-02 -4.14683968e-02 2.57848185e-02\n 3.13255675e-02 -1.89194549e-02 6.33888394e-02 -1.96880028e-02\n 1.89302478e-03 -2.79403012e-02 -1.88838542e-02 8.03714097e-02\n -1.16152786e-01 5.05274236e-02 -4.57780771e-02 -2.44058166e-02\n 1.13019362e-01 -6.66995794e-02 -1.86483301e-02 8.78450125e-02\n 3.53304446e-02 -3.01662739e-03 5.88508062e-02 -4.49018627e-02\n 1.36920288e-02 2.29127724e-02 9.45871472e-02 1.05478518e-01\n -4.53364477e-02 2.57956330e-02 -2.16149329e-03 -9.24483221e-03\n -7.78093114e-02 1.20169735e-02 6.55769408e-02 2.42224801e-02\n 1.74715109e-02 4.75113001e-03 1.07307337e-01 -9.55864117e-02\n 1.60894990e-02 -2.44223177e-02 -1.16553448e-01 2.60260608e-02\n 5.12951380e-03 1.77047327e-02 1.42397778e-02 -5.82170281e-34\n -3.05856057e-02 7.88794979e-02 -4.03923467e-02 1.17275603e-02\n 2.46179234e-02 5.05242012e-02 -3.29059176e-02 1.56838391e-02\n 2.59083672e-03 2.02956051e-03 -3.07930652e-02 -7.64818117e-03\n -3.28522623e-02 3.46174277e-02 4.26793396e-02 -7.97003806e-02\n -1.20623205e-02 8.97944421e-02 -7.58777633e-02 9.79575589e-02\n 1.21618861e-04 -2.04566941e-02 2.97681615e-02 -3.71697173e-02\n -3.47144008e-02 3.13737579e-02 2.14922614e-02 1.07621036e-01\n 2.29558386e-02 -1.57039519e-02 -2.55984301e-03 2.85383463e-02\n 6.14559874e-02 -3.92725058e-02 -9.52306986e-02 -2.06415635e-02\n 1.86121017e-02 -4.37206738e-02 3.72605994e-02 6.67646751e-02\n -9.35446769e-02 9.91660282e-02 -1.02685029e-02 -3.31221074e-02\n 4.94719297e-02 8.05206895e-02 -4.77793403e-02 2.21446399e-02\n -3.22804553e-03 1.91047583e-02 -4.61873673e-02 -3.46056297e-02\n 5.16171716e-02 -5.42538390e-02 -4.20919769e-02 1.52763603e-02\n 6.56960458e-02 -6.20348006e-03 -1.19234985e-02 2.32222285e-02\n 4.68902476e-03 -6.58559948e-02 -8.01746547e-02 1.51233654e-02\n -2.85594128e-02 3.92161496e-03 1.13885356e-02 7.53478333e-02\n -8.24335888e-02 -3.00958063e-02 -2.79092900e-02 -2.04853453e-02\n 7.95649663e-02 -3.83589342e-02 3.01539600e-02 -7.74900382e-03\n -8.89914669e-03 4.41262089e-02 -1.79761788e-04 3.03396638e-02\n -4.68400046e-02 7.60849938e-02 6.60249144e-02 -8.33366513e-02\n -1.69759374e-02 -2.67662536e-02 -4.86293770e-02 -4.01016772e-02\n -2.49553621e-02 7.00949412e-03 -7.90972263e-02 -1.93647426e-02\n 4.42139283e-02 -2.61276085e-02 -4.23909463e-02 2.92839382e-34\n 5.25576361e-02 -4.15610895e-02 -1.63368583e-02 7.49059319e-02\n -8.48552138e-02 6.38155490e-02 5.82855046e-02 7.95199648e-02\n 4.10758108e-02 -5.42371161e-02 1.79211758e-02 5.62517568e-02\n -4.25040238e-02 -1.33333867e-02 7.70854810e-03 1.57240089e-02\n 5.41690104e-02 -6.42741099e-02 -5.00638969e-02 -6.49323985e-02\n 2.75522238e-03 1.62643213e-02 4.80731912e-02 -1.84971765e-02\n 6.26914576e-02 -2.01014597e-02 -1.43193245e-01 6.90687541e-03\n -2.52383538e-02 1.38061447e-02 7.16089755e-02 -3.54052372e-02\n 2.24054717e-02 -2.80264113e-02 6.38307258e-02 5.37601970e-02\n 4.48399745e-02 -5.92586361e-02 -2.71432288e-02 7.92990103e-02\n 6.12495095e-02 5.55254593e-02 1.07170804e-03 3.29916701e-02\n 7.31739327e-02 4.29737493e-02 6.59812242e-02 -4.31640707e-02\n -1.23067135e-02 4.95145544e-02 4.40026969e-02 5.86094037e-02\n 2.76411418e-02 -1.21534169e-01 -3.15474682e-02 -5.36545590e-02\n -2.26216353e-02 4.55013812e-02 5.13776466e-02 -2.06862334e-02\n 3.08281910e-02 2.88294931e-03 -1.67090341e-01 -5.26334010e-02\n 5.65904975e-02 5.41152107e-03 5.57267964e-02 4.49956432e-02\n -1.32199414e-02 6.60952367e-03 -9.60292965e-02 -1.27179012e-01\n -7.92106837e-02 1.70797743e-02 2.08707936e-02 -4.06143367e-02\n 4.15251367e-02 4.47602458e-02 -1.56550445e-02 3.17314789e-02\n 4.80879545e-02 2.37677842e-02 2.27941684e-02 -1.64167455e-03\n 2.69933157e-02 4.63654585e-02 -3.92112657e-02 -4.21849824e-02\n -3.52650024e-02 8.11110809e-02 -6.36573881e-02 3.07463109e-02\n -3.58116776e-02 -3.84817459e-02 -5.21188267e-02 -1.56980349e-08\n 5.64565398e-02 8.23578797e-03 -6.71181455e-02 -2.13986915e-03\n -4.51794118e-02 -1.31698325e-01 2.12131608e-02 2.38601714e-02\n 2.62658838e-02 -5.68047911e-02 1.12650013e-02 -8.64319801e-02\n -1.09643601e-01 5.42675629e-02 8.13312754e-02 -3.37330699e-02\n -7.89283682e-03 1.18025199e-01 -2.32953392e-02 5.79333609e-05\n -1.00305472e-02 6.56805886e-03 -1.15811257e-02 -4.80358899e-02\n 3.47436965e-02 1.17794443e-02 -1.10617569e-02 4.89501432e-02\n 6.77963346e-02 2.60394290e-02 2.71458109e-03 2.05529276e-02\n 5.58367223e-02 -2.74833571e-02 4.08273898e-02 -8.66175536e-03\n -3.30160512e-03 5.36773764e-02 7.98957348e-02 -2.00896431e-02\n -3.91234420e-02 -3.98006551e-02 -5.39051220e-02 4.77694720e-03\n 4.96187285e-02 -4.07552309e-02 6.74499869e-02 -1.09467339e-02\n 7.74181681e-03 -2.11401824e-02 -4.48405299e-05 7.30854645e-02\n -5.24262711e-03 -4.21363562e-02 -1.63092669e-02 -7.59043321e-02\n 1.01188868e-01 3.60602029e-02 -2.60596350e-02 6.25517368e-02\n 6.34613112e-02 -2.92119035e-03 -2.37326249e-02 5.92539497e-02]", "13.49768352508545", "2.5652613639831543", "3.0", "1.0" ], [ "4", "5", "Love the high-resolution display, colors are vibrant", "[-2.90584229e-02 2.69457232e-02 4.01250236e-02 -5.78259639e-02\n -3.43022682e-03 -4.91079018e-02 3.77120115e-02 1.48734925e-02\n 4.47112396e-02 5.31204380e-02 -4.30262052e-02 9.47740749e-02\n 7.01563433e-02 -2.90339552e-02 -3.97576578e-02 6.48933500e-02\n 7.82022551e-02 -6.11629449e-02 -7.48971337e-03 -5.81627488e-02\n -6.33920357e-02 -8.82378519e-02 -4.02743295e-02 -1.64578892e-02\n -4.88095060e-02 1.46863479e-02 4.06634109e-03 4.79473360e-02\n 5.01005864e-03 -2.64166109e-02 -2.84375176e-02 5.40832691e-02\n 8.43601525e-02 1.67521313e-02 -6.16105199e-02 -3.75717320e-02\n 8.01700652e-02 -6.84166253e-02 -7.71489218e-02 2.11959854e-02\n -1.79150943e-02 1.43556837e-02 4.49877270e-02 2.20445190e-02\n -1.51461717e-02 -3.36143002e-02 4.23208922e-02 6.26147212e-03\n 1.43942423e-02 -2.66824365e-02 -1.23107724e-03 -4.51549515e-02\n -7.00577674e-03 -5.58204688e-02 -2.09344625e-02 8.95748883e-02\n -2.67363191e-02 -6.95788190e-02 7.97515437e-02 -3.58002409e-02\n 6.30996227e-02 6.80743307e-02 1.82350688e-02 3.89436744e-02\n 2.96018831e-02 -6.48056250e-03 -2.27561630e-02 -3.07061486e-02\n 7.57677807e-03 -1.57148577e-02 -3.57739292e-02 6.10419847e-02\n 3.83106247e-02 -2.39864457e-02 -3.55604813e-02 7.04791695e-02\n -1.30032469e-02 -8.16177800e-02 -3.42473239e-02 2.34758947e-02\n 5.19281812e-02 2.08288315e-03 -5.73784225e-02 5.77044077e-02\n 7.29730800e-02 -7.68898502e-02 -1.81475095e-03 -2.51685791e-02\n -1.58869680e-02 -4.11924496e-02 -7.81470165e-03 7.87890702e-02\n -7.48913437e-02 -7.77821196e-03 -1.22557908e-01 -5.00468798e-02\n 1.19787149e-01 -1.30200550e-01 3.97802470e-03 5.29761910e-02\n 9.61901993e-03 -3.80420275e-02 1.07141279e-01 5.07183652e-03\n -7.10349903e-02 -5.43352403e-02 4.07568030e-02 1.11392550e-01\n -2.97576785e-02 7.06648305e-02 6.76293820e-02 1.16210300e-02\n -6.93987906e-02 -8.40682536e-03 4.86470275e-02 4.30738516e-02\n -3.13518643e-02 5.21105900e-02 8.68050829e-02 -1.52107868e-02\n 2.63561606e-02 -8.21880344e-03 -9.60003063e-02 -6.73906179e-04\n 9.79004893e-03 -2.17445139e-02 3.00748479e-02 -2.19712182e-33\n 4.35495004e-03 2.87636779e-02 2.44487096e-02 5.85100688e-02\n 5.64132929e-02 3.50919701e-02 -4.12353687e-03 -4.75095212e-02\n -6.56261221e-02 6.51814835e-03 9.55072418e-03 1.02516241e-01\n -5.18861599e-02 1.04193993e-01 -5.78030795e-02 -8.34774226e-02\n 9.54385009e-03 2.43143104e-02 -8.51888582e-02 8.99248049e-02\n -3.88088934e-02 -5.33115305e-02 4.69485372e-02 1.67936198e-02\n -2.84249242e-03 3.74529511e-02 8.26133117e-02 8.73046294e-02\n 1.83232464e-02 -7.76643108e-04 1.78499650e-02 -3.40500637e-03\n 6.97058365e-02 1.19689712e-02 -1.25520006e-01 -9.09774564e-03\n -5.92896789e-02 -1.87738910e-02 6.18207119e-02 8.65838751e-02\n -5.89974076e-02 4.20069359e-02 -3.52537888e-03 7.69987404e-02\n 3.38558517e-02 1.17405206e-01 3.76934335e-02 -2.04096846e-02\n 4.00773510e-02 1.41273383e-02 -1.19143896e-01 -7.94652924e-02\n -3.96796986e-02 -1.13316551e-02 6.52652932e-03 -3.38803455e-02\n 6.29374012e-02 4.29381058e-02 2.50291619e-02 2.91336626e-02\n -2.36720145e-02 6.34684637e-02 -7.50139728e-02 -3.57032614e-03\n 2.61870120e-03 1.37783876e-02 9.55460221e-03 2.51445770e-02\n -8.48709419e-02 1.14979437e-02 -1.85300019e-02 -2.75895721e-03\n 8.67943689e-02 -5.15532829e-02 -6.06389903e-02 -3.76067460e-02\n 2.05183942e-02 4.17718068e-02 2.63894763e-04 -9.56868101e-03\n -2.30636075e-02 -2.86344043e-03 3.05939782e-02 -1.90291870e-02\n -9.16362628e-02 1.71285402e-02 -6.79270402e-02 -1.92602072e-02\n -5.07869758e-02 -4.13195118e-02 7.25969113e-03 -4.91902754e-02\n 1.21937677e-01 -5.70706055e-02 -7.09738061e-02 2.48776133e-33\n 6.54185563e-02 -3.19522358e-02 -6.23006485e-02 1.17660575e-02\n -1.72019694e-02 1.83594115e-02 1.97721180e-02 1.13947533e-01\n -3.17439921e-02 -1.12664476e-02 7.24409297e-02 6.04574755e-02\n -1.15937933e-01 5.39525338e-02 -3.99395600e-02 -7.95590132e-03\n 1.18734583e-01 8.86650383e-03 -3.50946002e-02 -8.18535909e-02\n -5.41884862e-02 7.81944953e-03 -1.98346041e-02 -1.61109883e-02\n -1.52159566e-02 -1.60354245e-02 -3.96248400e-02 -1.25404941e-02\n 2.38588117e-02 5.62065281e-02 3.89726497e-02 -2.27232929e-02\n 3.00374515e-02 2.17843335e-02 2.72455178e-02 1.12060150e-02\n 2.81903837e-02 -6.14856146e-02 -3.00118458e-02 8.91187266e-02\n 9.39041935e-03 2.89491042e-02 6.74612448e-02 1.38228154e-02\n 2.66275890e-02 5.07611260e-02 -2.91820858e-02 -5.16936481e-02\n 6.78193383e-03 -1.76861603e-02 -2.45789271e-02 -1.98423956e-02\n 4.41247374e-02 -8.88053402e-02 -5.85379731e-03 -8.37330446e-02\n 1.14646954e-02 1.15167268e-01 6.10142536e-02 3.88400778e-02\n -3.62667553e-02 2.08177753e-02 -1.34540960e-01 -2.78145410e-02\n 5.70730790e-02 7.77568622e-03 2.32762732e-02 -6.34133220e-02\n 4.62282524e-02 2.55950801e-02 -4.99113426e-02 -8.12007934e-02\n -5.54336943e-02 -2.88506821e-02 7.25922883e-02 -7.54622594e-02\n 3.13490927e-02 4.93409820e-02 -1.86115950e-02 4.05127071e-02\n 3.57167143e-03 3.82701121e-02 6.95137233e-02 1.20798498e-02\n -1.79477278e-02 5.55895343e-02 -5.82342893e-02 -1.40335774e-02\n -2.81746848e-03 -4.75756358e-03 -2.21103970e-02 7.18431994e-02\n -2.83112563e-02 -9.13801342e-02 4.01639342e-02 -1.60245541e-08\n 1.75544396e-02 -2.33374219e-02 -2.09316052e-02 -5.95678799e-02\n 4.49546240e-03 -9.42310914e-02 5.54150343e-02 -1.88356750e-02\n 4.63514477e-02 4.29274999e-02 5.99659160e-02 -1.13450862e-01\n -5.49854338e-02 6.54422641e-02 7.41950795e-02 -2.52708532e-02\n -1.84550567e-03 7.12110326e-02 -4.18473501e-03 3.78461219e-02\n -3.19096670e-02 4.99302559e-02 1.15008354e-02 -1.86685361e-02\n 7.70606846e-03 1.38113415e-02 -2.49883309e-02 6.23533130e-03\n 1.09196492e-02 -1.82163585e-02 -2.82877535e-02 7.53280567e-03\n 1.11785177e-02 -6.12918548e-02 9.38422792e-03 1.58002935e-02\n -5.15251160e-02 6.80661798e-02 4.16464768e-02 -5.80952950e-02\n -6.87699392e-02 -3.24713290e-02 -7.62279332e-02 -1.29965250e-03\n 2.36361548e-02 -3.81913446e-02 4.22489569e-02 3.56248990e-02\n -4.83591296e-02 2.98280586e-02 -7.10062608e-02 -2.37691216e-02\n 7.92257302e-03 -1.15440562e-02 -1.36801880e-02 -1.25230610e-01\n 3.47834229e-02 8.10263976e-02 -1.29388645e-02 1.03150323e-01\n 9.89586115e-02 2.61059273e-02 2.37407745e-03 5.00593483e-02]", "13.295994758605957", "2.0673258304595947", "3.0", "1.0" ] ], "shape": { "columns": 7, "rows": 5 } }, "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
respondent_idcommentssentence_embeddingumap_xumap_yclustercluster_probability
01Battery life is excellent, lasts all day[-0.038631026, 0.044625234, -0.028667396, -0.0...11.3563664.0526780.01.0
12The battery doesn't last long enough for me[-0.0007719228, -0.0042446144, 0.011075384, -0...11.5823583.5869390.01.0
23Battery performance is outstanding, very impre...[-0.008022247, 0.09049879, -0.0867905, -0.0022...11.7528244.1916820.01.0
34Screen resolution is incredible, so sharp and ...[-0.014808243, -0.03135826, 0.035538964, -0.05...13.4976842.5652613.01.0
45Love the high-resolution display, colors are v...[-0.029058423, 0.026945723, 0.040125024, -0.05...13.2959952.0673263.01.0
\n", "
" ], "text/plain": [ " respondent_id comments \\\n", "0 1 Battery life is excellent, lasts all day \n", "1 2 The battery doesn't last long enough for me \n", "2 3 Battery performance is outstanding, very impre... \n", "3 4 Screen resolution is incredible, so sharp and ... \n", "4 5 Love the high-resolution display, colors are v... \n", "\n", " sentence_embedding umap_x umap_y \\\n", "0 [-0.038631026, 0.044625234, -0.028667396, -0.0... 11.356366 4.052678 \n", "1 [-0.0007719228, -0.0042446144, 0.011075384, -0... 11.582358 3.586939 \n", "2 [-0.008022247, 0.09049879, -0.0867905, -0.0022... 11.752824 4.191682 \n", "3 [-0.014808243, -0.03135826, 0.035538964, -0.05... 13.497684 2.565261 \n", "4 [-0.029058423, 0.026945723, 0.040125024, -0.05... 13.295995 2.067326 \n", "\n", " cluster cluster_probability \n", "0 0.0 1.0 \n", "1 0.0 1.0 \n", "2 0.0 1.0 \n", "3 3.0 1.0 \n", "4 3.0 1.0 " ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_clustered.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can see on the datamapplot that similar comments are closer together. By varying the cluster_epsilon you can tweak the number of clusters (clustering works better on much larger datasets)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import datamapplot\n", "\n", "datamapplot.create_interactive_plot(df_clustered[['umap_x', 'umap_y']].values, df_clustered['cluster'].astype(str).values, hover_text=df_clustered['comments'])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.4" } }, "nbformat": 4, "nbformat_minor": 2 }